#include "utils.h"
#include "coord.h"
#include "csbmath.h"
#include "csnode.h"

#ifdef __cplusplus
extern "C" {
#endif

CSB_DLL bool csb_common_init(float w, float h)
{
	COORD_CONFIG_VIEW_WORLD(w, h);
	CSB_math_init();
	list_buf_init();
	csnode_buf_init();
	CSB_NO_RET(CSBERR_NOERR == csberrno, false);
	csobj_buf_init();
	CSB_NO_RET(CSBERR_NOERR == csberrno, false);
	return true;
}

CSB_DLL void csb_common_end(bool force)
{
	csnode_buf_end(force);
	csobj_buf_end(force);
}

#ifdef __cplusplus
} /* end extern C */
#endif
